#!/usr/bin/env python3
# -*- coding=utf-8 -*-
# 题目100：列表转换为字典。


def f1():
    l = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
    d = {}
    for x in range(len(l)):
        d[x] = l[x]
    print(d)


# def f2():
#     l = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
#     d = {}
#     d[x] = l[x] for x in range(len(l))

#     print(d)

f = f1
if __name__ == "__main__":
    f()
